package dashboard.statrpt.field;

public enum RptInstanceActivityStats implements RptField {
	
	ConsistentChangesTotal("consistent changes", 2, Double.class, "Consistent changes (total):"),
	ConsistentChangesPS("consistent changes", 3, Double.class, "Consistent changes (per sec):"),
	ConsistentChangesPT("consistent changes", 4, Double.class, "Consistent changes (per trans):"),
	
	ConsistentGetsTotal("consistent gets", 2, Double.class, "Consistent gets (total):"),
	ConsistentGetsPS("consistent gets", 3, Double.class, "Consistent gets (per sec):"),
	ConsistentGetsPT("consistent gets", 4, Double.class, "Consistent gets (per trans):"),
	
	ConsistentGetsDirectTotal("consistent gets direct", 2, Double.class, "Consistent gets direct (total):"),
	ConsistentGetsDirectPS("consistent gets direct", 3, Double.class, "Consistent gets direct (per sec):"),
	ConsistentGetsDirectPT("consistent gets direct", 4, Double.class, "Consistent gets direct (per trans):"),
	
	ConsistentGetsFromCacheTotal("consistent gets from cache", 2, Double.class, "Consistent gets from cache (total):"),
	ConsistentGetsFromCachePS("consistent gets from cache", 3, Double.class, "Consistent gets from cache (per sec):"),
	ConsistentGetsFromCachePT("consistent gets from cache", 4, Double.class, "Consistent gets from cache (per trans):");
	
	private String label;
	private String name;
	private int colIndex;
	private Class type;
	
	RptInstanceActivityStats(String name, int colIndex, Class type, String label){
		this.name = name;
		this.colIndex = colIndex;
		this.type = type;
		this.label = label;
	}

	@Override
	public String getFieldName() {
		return name;
	}

	@Override
	public int getColIndex() {
		return colIndex;
	}

	@Override
	public Class getFieldType() {
		return type;
	}
	
	public String getLabel(){
		return label;
	}
	
	public String getKey(){
		return name();
	}
}
